package cn.xz.mxxz.adapter

import android.graphics.Color
import android.widget.TextView
import cn.xz.mxxz.R
import cn.xz.mxxz.bean.ListBean
import cn.xz.mxxz.bean.ListBean2
import cn.xz.mxxz.util.AppHelper
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

/**
 *通用一级适配器*/
class Map2Adapter: BaseQuickAdapter<ListBean2, BaseViewHolder>(R.layout.item_map_2) {

    override fun convert(holder: BaseViewHolder, item: ListBean2) {

        val tvTxt = holder.getView<TextView>(R.id.tv_txt)

        tvTxt.text = item.name

        var mC = "#99FFFFFF"
        if (item.select){
            mC = "#FFFFFF"
        }
        tvTxt.setBackgroundColor(Color.parseColor(mC))
    }
}